package com.chouxiaozi.hungry;


public class Test {
    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            Thread thread = new Thread(()->{
                HungrySingleton instance = HungrySingleton.getInstance();
                HungrySingleton instance2 = HungrySingleton.getInstance();
                System.out.println(instance == instance2);
            });
            thread.run();
        }

    }
}
